import request from "@/utils/request";
// 获取购物车
export function cartInfo(data?: Record<string, any>) {
  return request.post({ url: "/admin/m/cart/info", data });
}
// 添加、修改用户购物车
export function cartChange(data: Record<string, any>) {
  return request.post({ url: "/admin/m/cart/change", data });
}
// 获取购物车产品数量
export function cartProdCount() {
  return request.get({ url: "/admin/m/cart/prodCount" });
}
// 获取购物车失效产品信息
export function cartExpiryProdList() {
  return request.get({ url: "/admin/m/cart/expiryProdList" });
}
// 清空用户失效产品
export function cartCleanExpiryProdList() {
  return request.delete({ url: "/admin/m/cart/cleanExpiryProdList" });
}
// 获取选中购物项总计、选中的产品数量
export function cartTotalPay(data?: Record<string, any>) {
  return request.post({ url: "/admin/m/cart/totalPay", data });
}
// 删除购物车
export function cart(data: Record<string, any>) {
  return request.delete({ url: '/admin/m/cart', data });
}
// 清空购物车
export function cartClear() {
  return request.delete({ url: "/admin/m/cart/clear" });
}